package com.donzell.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EcsAdminUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ecs_admin_user")
public class EcsAdminUser implements java.io.Serializable {

	// Fields

	private Short userId;
	private String userName;
	private String email;
	private String password;
	private String phone;
	private String ecSalt;
	private Date addTime;
	private Date lastLogin;
	private String lastIp;
	private String actionList;
	private String navList;
	private String langType;
	private Short agencyId;
	private Short suppliersId;
	private String todolist;
	private Short roleId;
	private Short isUse;

	// Constructors

	/** default constructor */
	public EcsAdminUser() {
	}

	/** minimal constructor */
	public EcsAdminUser(String userName, String email, String password,String phone, Date addTime, Date lastLogin,
			String lastIp, String actionList, String navList, String langType, Short agencyId) {
		this.userName = userName;
		this.email = email;
		this.password = password;
		this.phone = phone;
		this.addTime = addTime;
		this.lastLogin = lastLogin;
		this.lastIp = lastIp;
		this.actionList = actionList;
		this.navList = navList;
		this.langType = langType;
		this.agencyId = agencyId;
	}

	/** full constructor */
	public EcsAdminUser(String userName, String email, String password,String phone, String ecSalt, Date addTime,
			Date lastLogin, String lastIp, String actionList, String navList, String langType, Short agencyId,
			Short suppliersId, String todolist, Short roleId,Short isUse) {
		this.userName = userName;
		this.email = email;
		this.password = password;
		this.phone = phone;
		this.ecSalt = ecSalt;
		this.addTime = addTime;
		this.lastLogin = lastLogin;
		this.lastIp = lastIp;
		this.actionList = actionList;
		this.navList = navList;
		this.langType = langType;
		this.agencyId = agencyId;
		this.suppliersId = suppliersId;
		this.todolist = todolist;
		this.roleId = roleId;
		this.isUse = isUse;
	}

	// Property accessors
	@Id
	@SequenceGenerator(name = "SHOP_IDENTIFIER_IDENT_ID_GENERATOR", sequenceName = "SHOP_ID_SEQUENCE", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SHOP_IDENTIFIER_IDENT_ID_GENERATOR")
	@Column(name = "user_id", unique = true, nullable = false)
	public Short getUserId() {
		return this.userId;
	}

	public void setUserId(Short userId) {
		this.userId = userId;
	}

	@Column(name = "user_name",unique = true, nullable = false, length = 60)
	public String getUserName() {
		return this.userName;
	}

	@Column(name = "phone", length = 11)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "email", length = 60)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "password", nullable = false, length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "ec_salt", length = 10)
	public String getEcSalt() {
		return this.ecSalt;
	}

	public void setEcSalt(String ecSalt) {
		this.ecSalt = ecSalt;
	}
	
	@Temporal(TemporalType.DATE)
	@Column(name = "add_time")
	public Date getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "last_login")
	public Date getLastLogin() {
		return this.lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	@Column(name = "last_ip", length = 15)
	public String getLastIp() {
		return this.lastIp;
	}

	public void setLastIp(String lastIp) {
		this.lastIp = lastIp;
	}

	@Column(name = "action_list")
	public String getActionList() {
		return this.actionList;
	}

	public void setActionList(String actionList) {
		this.actionList = actionList;
	}

	@Column(name = "nav_list")
	public String getNavList() {
		return this.navList;
	}

	public void setNavList(String navList) {
		this.navList = navList;
	}

	@Column(name = "lang_type")
	public String getLangType() {
		return this.langType;
	}

	public void setLangType(String langType) {
		this.langType = langType;
	}

	@Column(name = "agency_id")
	public Short getAgencyId() {
		return this.agencyId;
	}

	public void setAgencyId(Short agencyId) {
		this.agencyId = agencyId;
	}

	@Column(name = "suppliers_id")
	public Short getSuppliersId() {
		return this.suppliersId;
	}

	public void setSuppliersId(Short suppliersId) {
		this.suppliersId = suppliersId;
	}

	@Column(name = "todolist")
	public String getTodolist() {
		return this.todolist;
	}

	public void setTodolist(String todolist) {
		this.todolist = todolist;
	}

	@Column(name = "role_id")
	public Short getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Short roleId) {
		this.roleId = roleId;
	}

	public Short getIsUse() {
		return isUse;
	}

	@Column(name = "is_use")
	public void setIsUse(Short isUse) {
		this.isUse = isUse;
	}
	
	

}